<html>
<header>
<title>testAdmin of autoComplete</title>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js'></script>
<script>
$(document).ready(function(){
		
        $("button#Refresh").click(function(){  
        	$.get('/admin/testAdmin/',{'action':"refresh"}, function(data) {
        		//$("table#content").tbody=data
        		alert(data);
        	});  
        });  
        $("button#Add").click(function(){  
        	//alert($("input#addword").val());
            $.post('/admin/testAdmin/',{'action':"add",'word':$("#addword").val()}, function(ret) {alert(ret);});    
        });
        $("button#Del").click(function(){  
            $.post('/admin/testAdmin/',{'action':"del",'word':$("#delword").val()}, function(ret) {});    
        });
    });  
</script>

</header>
<body>
<p>this is the testAdmin of autoComplete</p>
<table id="content">
{% for word in words  %}
	<tr><td>{{ word.word }}</td></tr>
{% endfor  %}
</table>

<table id="content">
{{  gogogo|safe  }}
</table>
<button id="Refresh">Refresh</button>
<button id="Add">Add</button><input id="addword" value="123" />
<button id="Del">Delete</button><input id="delword" />
</body>
</html>